<template>
  <header class="mall-header cover">
    <div class="container">
      <div class="logo" @click="backHome">
        <img src="../../assets/logo.png" alt="My Logo" />
      </div>
      <div class="user">wgf</div>
    </div>
  </header>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";

@Component({
  name: "MallHeader",
})
class Header extends Vue {
  backHome() {
    this.$router.push({ name: "Home" });
  }
}

export default Header;
</script>

<style lang="scss" scoped>
@import "@/assets/css/mixins.scss";

.mall-header {
  height: 5rem;
  background: #fff;

  .container {
    @include flex-container;
    height: 100%;
    justify-content: space-between;

    .logo {
      width: 5rem;
      height: 100%;
      padding: 0.6rem;

      img {
        height: 100%;
      }
    }

    .user {
      display: flex;
      width: 10rem;
      height: 100%;
      padding: 1rem;
      justify-content: center;
      align-items: center;
      font-size: 1rem;
    }
  }
}
</style>
